/*
 * @Descripttion: 
 * @version: 
 * @Author: -ViJia
 * @Date: 2022-03-17 10:12:16
 * @LastEditors: -ViJia
 * @LastEditTime: 2022-03-22 11:15:51
 */
export const setDocumentTitle = function (title) {
  document.title = title;
  const ua = navigator.userAgent;
  // eslint-disable-next-line
  const regex = /\bMicroMessenger\/([\d\.]+)/
  if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) {
    const i = document.createElement('iframe');
    i.src = '/favicon.ico';
    i.style.display = 'none';
    i.onload = function () {
      setTimeout(() => {
        i.remove();
      }, 9);
    };
    document.body.appendChild(i);
  }
};

export const domTitle = 'AI数字人-管理后台';
